import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getOrderAPI } from '@/apis/order.js'

export const useOrderStore = defineStore('order', () => {
    // state
    const orderInfo = ref([])

    const getOrderInfo = async () => {
        const res = await getOrderAPI()
        orderInfo.value = res.data.data
    }
    

    return {
        getOrderInfo,
        orderInfo,
    }
})